package ogl;

public class Commando extends Soldier {

	public final float red = 1f;
	public final float green = 1.5f;
	public final float blue = 0;

	private final float distanta = 300;

	public Commando(float x, float y) {
		this.x = x;
		this.y = y;
	}

	@Override
	public void move(float x, float y) {

		if ((x - this.x > distanta) || (y - this.y > distanta))
			System.out.println("Nu se poate face mutarea: x-this.x =:"
					+ (x - this.x) + "| distanta = " + distanta);

		else {
			this.x = x;
			this.y = y;
		}

	}

	@Override
	public void render() {
		Draw.rect(x, y, sx, sy, red, green, blue);
	}

}
